package psd.model.Prolog.Converters;

import org.eclipse.jdt.core.dom.InstanceofExpression;

import psd.model.IConverter;
import psd.model.Prolog.FactGenerationToolbox;
import psd.model.Prolog.PrologConverter;


public class PrologInstanceofExpressionConverter extends PrologConverter
		implements IConverter<InstanceofExpression> {

	public PrologInstanceofExpressionConverter(FactGenerationToolbox toolbox) {
		super(toolbox);
	}

	@Override
	public boolean convert(InstanceofExpression node) {
		String args[] = { typeResolver.getTypeTerm(node.getRightOperand()),
				idResolver.getID(node.getLeftOperand()) };
		createBodyFact(node, "typeTestT", args);
		return true;
	}

}
